    .text                     # Start text section
    #.balign 4                # align section to 4 bytes - which is also the default?
    .global solve         # define global function symbol
solve:
	vsetvli t0, a0, e16, ta, ma # Set vector length based on 16-bit vectors
	vle16.v v0, (a1)
	sub a0, a0, t0
	slli t0, t0, 1
	add a1, a1, t0

	vsext.vf2 v16, v0

	vse32.v v16, (a2)
	add a2, a2, t0

	bnez a0, solve	
	ret # Finished
